public class FuncCallRet extends Quaternion {
    private Pairs rParam;   //rParam 或 return值(函数return的值)
    private Pairs func;
    private Pairs address;

    public FuncCallRet(Pairs rParam, Pairs func, Pairs address, OP op) {
        super(op);
        this.func = func;
        this.rParam = rParam;
        this.address = address;
    }

    public Pairs getrParam() {
        return this.rParam;
    }

    public Pairs getAddress() {
        return this.address;
    }

    public Pairs getFunc() {
        return this.func;
    }

    public String toString() {
        if (rParam == null) {
            if (func == null) {
                return opToString() + " void\n";
            }
            return opToString() + " " + func.getToken() + "\n";
        } else {
            if (address != null) {
                return opToString() + " " + rParam.getToken() + "[" + address.getToken() + "]" + "\n";
            }
            return opToString() + " " + rParam.getToken() + "\n";
        }
    }
}
